<?php

namespace app\exception;
use think\Exception;
class BaseException extends Exception
{
    public $code = 400;
    public $message = 'invalid parameters';
    public $errorCode = 999;

    /**构造函数
     * BaseException constructor.
     * @param string $message 错误描述
     * @param int $code http状态码
     * @param int $err 错误码
     */
    public function __construct($message='',$code=0,$errorCode=0)
    {
        if($message) $this->message = $message;
        if($code) $this->code = $code;
        if($errorCode) $this->errorCode = $errorCode;
    }
}